// 获取会员列表数据 获取会员列表
export function queryMemberList (data) {
  return window.fetch({
    method: 'POST',
    url: '/member/queryMemberList',
    data: data
  })
}
//  通过id获取会员详情
export function queryMemberById (id) {
  return window.fetch({
    method: 'POST',
    url: '/member/queryMemberById',
    data: id
  })
}
// 获取会员订单列表
export function queryCouponOrderList (id) {
  return window.fetch({
    method: 'POST',
    url: '/member/queryCouponOrderList',
    data: id
  })
}

// 获取会员邀请记录
export function queryCouponInfoList (id) {
  return window.fetch({
    method: 'POST',
    url: '/member/queryCouponInfoList',
    data: id
  })
}
//  编辑会员信息
export function updateMember (data) {
  return window.fetch({
    method: 'POST',
    url: '/member/updateMember',
    data: data
  })
}
//分销列表
export function getDistributionList (data) {
  return window.fetch({
    method: 'POST',
    url: '/member/distribution',
    data: data
  })
}

//  会员信息 

export function getMemberConfigInfo () {
  return window.fetch({
    method: 'POST',
    url: '/member_config/info'
  })
}

//  编辑会员卡
export function setMemberConfigInfo (data) {
  return window.fetch({
    method: 'POST',
    url: '/member_config/redact',
    data
  })
}

// 查看会员等级

export function getMemberCardLevel () {
  return window.fetch({
    method: 'POST',
    url: '/member_class/class/look'
  })
}

// 编辑会员等级

export function setMemberLevel (data) {
  return window.fetch({
    method: 'POST',
    url: '/member_class/redact',
    data
  })
}

// 删除会员等级 
export function deleteMemberLevel (id) {
  return window.fetch({
    method: 'POST',
    url: '/member_class/delete',
    data:id
  })
}

//会员卡列表
export function getMemberCardList () {
  return window.fetch({
    method: 'POST',
    url: '/member_config/list'
  })
}
// 会员卡信息
export function getMemberCardInfo () {
  return window.fetch({
    method: 'POST',
    url: '/member_config/info'
  })
}

//  编辑会员卡
export function setMemberCard (data) {
  return window.fetch({
    method: 'POST',
    url: '/member_config/redact',
    data
  })
}

// 会员权益查看
export function getMemberEquity () {
  return window.fetch({
    method: 'POST',
    url: '/member_class/rights/look'
  })
}

//  会员权益列表
export function getMemberEquityList (data) {
  return window.fetch({
    method: 'POST',
    url: '/member_class/rights/list',
    data
  })
}
//  会员权益新增
export function addMemberEquity(data) {
  return window.fetch({
    method: 'POST',
    url: '/member_class/rights/add',
    data
  })
}
//  会员权益删除
export function deleteMemberEquity(data) {
  return window.fetch({
    method: 'POST',
    url: '/member_class/rights/delete',
    data
  })
}

//  会员权益下拉
export function memberEquityPull() {
  return window.fetch({
    method: 'POST',
    url: '/member_class/rights/pull'
  })
}

//  会员卡预览 

export function memberPreview() {
  return window.fetch({
    method: 'POST',
    url: '/member_config/preview'
  })
}

//  查看会员积分
export function getMemberIntegral() {
  return window.fetch({
    method: 'POST',
    url: '/member_config/integral/look'
  })
}

//  设置会员积分
export function setMemberIntegral(data) {
  return window.fetch({
    method: 'POST',
    url: '/member_config/integral',
    data
  })
}

//  会员日列表
export function getMemberDayList(data) {
  return window.fetch({
    method: 'POST',
    url: '/member_config/day/list',
    data
  })
}
//会员日删除
export function deleteMemberDay(id) {
  return window.fetch({
    method: 'POST',
    url: '/member_config/day/delete',
    data:id
  })
}

// 新增会员日
export function addMemberDay(data) {
  return window.fetch({
    method: 'POST',
    url: '/member_config/day',
    data
  })
}

//  会员权益配置

export function updateMemberEquity(data) {
  return window.fetch({
    method: 'POST',
    url: '/member_class/rights',
    data
  })
}

// 营销管理列表
export function getMarketingList(data) {
  return window.fetch({
    method: 'POST',
    url: '/marketing_manage/list',
    data
  })
}

// 设置活动状态
export function updateActiveState(data) {
  return window.fetch({
    method: 'POST',
    url: '/marketing_manage/state',
    data
  })
}

//  编辑活动
export function addEditActive(data) {
  return window.fetch({
    method: 'POST',
    url: '/marketing_manage/redact',
    data
  })
}
//  查看营销管理
export function getActiveInfo(id) {
  return window.fetch({
    method: 'POST',
    url: '/marketing_manage/info',
    data:id
  })
}

//  获取优惠券列表数据

export function getCouponList(data) {
  return window.fetch({
    method: 'POST',
    url: '/marketing/coupon/list',
    data
  })
}

//会员列表导出

export function exportMemberList(data){
  return window.fetch({
    method: 'POST',
    url: '/member/queryMemberExcel',
    data
  })
}

//  查看员工邀请信息 
export function getSupInfo (data) {
  return window.fetch({
    method: 'POST',
    url: '/member/supInfo',
    data: data
  })
}



